<empty name="keywords">
<span class="no_keywords_found">该推广计划下还没有投放关键词.</span> 
<else /> 

<div class="tableoptions" id="kh_options" style="padding:0px;">
</div>


<table cellpadding="0" cellspacing="0" border="0" class="metrotable" id="kh_dyntable">
<thead id="km_thead">
    <tr>
        <th width="2%" class="head0 nolborder"><input id="checkall" type="checkbox" class="checkall"></th>
        <th width="18%" class="head1">宝贝</th>
        <th width="13%" class="head1">关键词 ( {$keywords|count} 个)</th>
        <th width="6%"  class="head0 sortable desc" data-sort='impressions'>展现量</th>
        <th width="6%" class="head1 sortable" data-sort='click'>点击量</th>
        <th width="6%" class="head0 sortable" data-sort='sales'>总成交</th>
        <th width="6%" class="head1 sortable" data-sort='cost'>总花费</th>
        <th width="6%" class="head0 sortable" data-sort='ctr'>点击率</th>
        <th width="6%" class="head1 sortable" data-sort='avgpos'>宝贝排名</th>
        <th width="7%" class="head0 sortable" data-sort='cpm'>千次展现费</th>
        <th width="8%" class="head1 sortable" data-sort='cpc'>平均点击花费</th>
        <th width="10%" class="head0">当前出价</th>
        <!-- <th width="10%" class="head1">智能调价</th>-->
        <th width="6%" class="head0 norborder">操作</th>
    </tr>
</thead>

<tbody id="keywords_tbody">
    <volist name="keywords" id="v">
    <tr class="gradeX">
        <td class="center nolborder"><input value="{$v.keyword_id}"  name="keyword_id" type="checkbox" class="keyword_id checkit"></td>
        <td>
        	<a href="/adgroup/manage?adgroup_id={$v.adgroup_id}" >{$v.title} <img src="{$v.img_url}" style="width:25px;" /></a>
        </td>
        <td class="center word">
         {$v.word}
         <input type="hidden" value="{$v.word}" name="word" class="word"/>
         <span class="keywordActionInfo"></span> 
        </td>
        <td class="center num">{$v.impressions|display_str}</td>
        <td class="center num">{$v.click|display_str}</td>
 		<td class="center num">{$v.sales|round=2|display_str}</td>
 		<td class="center num">{$v.cost|round=2|display_str}</td>
        <td class="center num">{$v.ctr|round=2|display_str}%</td>
        <td class="center num">{$v.avgpos|round=0|display_str}
        	<span class="realtimeRank"></span>
        </td>
        <td  class="center num">￥{$v.cpm|round=2|display_str}</td>
        <td class="center num">￥{$v.cpc|round=2|display_str}</td>
        <td class="center">
        <input value="{$v.max_price}" type="text" name="price" class="price smallprice currencyinput keyword_price"  style="width:50px;float:left;"/>
        <a class="btn btn3 btn-nobg btn_pencil_s  hiddenbtn setPriceBtn" href="/keyword/forcast?keyword_id={$v.keyword_id}&price={$v.max_price}" title="详细调整关键词价格">查看</a>
        <span class="adjustPriceInfo"></span>
        </td>
        <!-- 
        <td class="center">
            <select class="radius3 setPriceMode" id="setPriceMode">
                <option value="1" <if condition='$v.smart_price eq 1'>selected="selected"</if>>智能模式</option>
                <option value="2" <if condition='$v.smart_price eq 2'>selected="selected"</if>>高速模式</option>
                <option value="3" <if condition='$v.smart_price eq 3'>selected="selected"</if>>经济模式</option>
                <option value="0" <if condition='$v.smart_price eq 0'>selected="selected"</if>>手动调价</option>
            </select> &nbsp; 
        </td>
        -->
        <td class="center norborder">
        	<a class="btn btn3 btn-nobg btn_trash_s deleteKeyword tooltip" title="删除这个关键词">删除</a>
        	<!-- <a class="btn btn3 btn-nobg btn_chart_s openUrlBtn" href="/keyword/chart?keyword_id={$v.keyword_id}" title="查看关键词历史">查看</a>  -->
        	<a class="btn btn3 btn-nobg btn_refresh_s cancelAction tooltip" title="取消当前所有操作">查看</a>
        </td>
    </tr>
    </volist>

</tbody>
</table>   


<!-- 批量操作layout  -->
<footer class="win-commandlayout navbar-fixed-bottom win-ui-dark" id="manager_action" style="display:none;">
      <div class="container">
  			   <a class="win-command" href="javascript:void(0);" id="saveChangesBtn">
                  <img src="/Img/save.png" class="win-commandimage">
                  <span class="win-label">保存修改</span>
               </a>
                  
      			<hr class="win-command">
				<a class="win-command" href="javascript:void(0);" id="multiDelete">
                  <img src="/Img/delete.png" class="win-commandimage">
                  <span class="win-label">批量删除</span>
               </a>
              
				<a class="win-command" href="javascript:void(0);" id="multiAdjustPrice"">
                  <img src="/Img/yen.png" class="win-commandimage change">
                  <span class="win-label">批量改价</span>
               </a>           
      </div>
</footer>
   
   

<div id="filterPikcer" class="daterangepicker dropdown-menu opensright" style="display: none; top: 98px; left: 40px; ">
   
   <div class="ranges" style="width:auto;float:none;">
   		<label>快速过滤关键词</label><small class="desc" style="display:inline">点击按钮即可显示相应关键词</small>
	   	<ul>
		   	<li>全部关键词</li>
		   	<li>无展现词</li>
		   	<li>无点击词</li>
		   	<li>无销售词</li>
	   	</ul>
	</div>
	
	<div class="selfset" style="padding:5px;" id="filter">
                 <label>设置指标过滤</label><small class="desc" style="display:inline">按以下指标来过滤关键词</small>
                   <div class="field" >
                       <span>出价: <strong><span id="amount1" class="color333"></span></strong></span>
                       <div id="priceSlider"></div>
                   </div>
                   <div class="field">
                       <span>展现量: <strong><span id="amount2" class="color333"></span></strong></span>
                       <div id="pvSlider"></div>
                   </div>
                   <div class="field">
                       <span>点击: <strong>
                       <span id="amount3" class="color333"></span></strong></span>
                       <input type="text"  value="" name="daterangepicker_start" class="input-mini input-tiny "> -
                       <input type="text" value="" name="daterangepicker_start" class="input-mini input-tiny ">
                       <div id="clickSlider"></div>
                   </div>
                   <div class="field">
                       <span>点击率: <strong><span id="amount4" class="color333"></span></strong></span>
                       <div id="ctrSlider"></div>
                   </div>
                   
	</div>
	
	   	<div class="range_inputs">
	<button class="stdbtn stdbtnsmall btn-success"> 确定  </button>&nbsp;
	</div>
					
</div> 


<div class="widget adjustpricewidget" id="adjustPanel" style="display:none;">
	
	<div class="row" id="adjustbyincrs">
		<small class="desc">在原价基础上增减固定数额的投放金额</small>
		<input type="radio" name="adjusttype" checked='checked'  value="incrs"/>
		<label>批量 </label>
		<span class="field">
		    <select id="adjustactionincrs" name="adjustaction">
		    	<option value="1" selected="selected">加价</option>
		    	<option value="-1">减价</option>
		    </select>	    
	    </span>
	    <span class="field">
	        <input type="text" class="price smallprice currencyinput" name="incremental" id="" value="0.05" style="width:50px;"/>
	    </span>
	    <label id="adjustactionincrs_label">但最高不超过 </label>
	    <span class="field">
    		<input type="text" class="price smallprice currencyinput" name="max_price" id="max_price"  value="0.00s" style="width:50px;" />
	    </span>	
	</div>
		
		
	<div class="row" id="adjustbyratio">
		<small class="desc">在原价基础上按比例增加出价或者减少出价</small>
		<input type="radio"  value="ratio"  name="adjusttype"/>
	    <label>按比例 </label>
	    <span class="field">
		    <select id="adjustactionratio" name="adjustaction">
		    	<option value="1" selected="selected">加价</option>
		    	<option value="-1">减价</option>
		    </select>	    
	    </span>
	    <span class="field">
	    <select name="incrsratio" id="adjustactionratio">
	    	<option value="5">5%</option>
	    	<option value="10">10%</option>
	    	<option value="15">15%</option>
	    	<option value="20">20%</option>
	    	<option value="25">25%</option>
	    	<option value="30">30%</option>
	    </select>
	    </span>
	    <label id="adjustactionratio_label">但最高不超过 </label>
	    <span class="field">
    		<input type="text" class="price smallprice currencyinput" name="max_price" id="max_price"  value="0.00s" style="width:50px;" />
	    </span>	
	</div>
	
	<div class="row" id="adjustbyfixed">
		<small class="desc">把当前选择的所有关键词的价格统一设置为一个价格</small>
		<input type="radio" name="adjusttype" value="fixed"/>
		<label>设置价格为</label>
		<span class="field">
		    <select id="" name="adjustaction">
		    	<option value="0">恢复其原价</option>
		    	<option value="1">统一设置价格为</option>
		    	<option value="2">推广组默认出价</option>
		    </select>	    
	    </span>
	    <span class="field">
	        <input type="text" class="price smallprice currencyinput" name="fixedprice" id="" value="0.05" style="width:50px;display:none;"/>
	    </span>
	</div>
		
</div>


<!-- 使用图来设定关键词价格弹出层  -->
<div class="widget adjustpricewidget" id="setPriceWithChartPanel" style="width:580px;display:none;">
	
	<div class="two_third">
		<div class="earnings" >
           <div class="one_fourth">
               <h4>出价</h4>
               <h2 id="forcast_price">
               </h2>
           </div>
           <div class="one_fourth" style="text-align:center;">
               <h4>预计排名</h4>
               <h2 id="forcast_rank"></h2>
           </div>
            <div class="one_fourth" style="text-align:center;">
               <h4>预计点击量</h4>
               <h2 id="forcast_click"></h2>
           </div>
                     
           <div class="one_fourth last alignright">
               <h4>预计消耗</h4>
               <h2 id="forcast_cust"></h2>
           </div>
        </div>
        
        <div id="keywordchart">
        	
        </div>
		
	</div>
	
	
	<div class="one_third last">
	    <div class="row">
	    <label>关键词出价</label><small class="desc" style="display:inline">你可以点击左边的图来设定价格</small>
	    <div class="field"><input style="font-weight:bold;font-size:18px;color:#229fdd;" type="text" class="width100 currencyinput" name="max_price" id="max_price" value="0" /></div>
	    </div>
	    
        <div class="row">
            <label>关键词匹配模式</label>
            <div class="field">
                <select name="matchscope">
                <option value="1">精确匹配</option>
                <option value="2">子串匹配</option>
                <option value="4">广泛匹配</option>
                </select>
            </div>
        </div>
	</div>

</div>

</empty>